
/*
	EmitterBase originally written for ParticlePlayground
	assigment.

	This is a simplified version for CGA class 
	2011 - 2
*/

#ifndef __EMITTER_BASE_CLASS__
#define __EMITTER_BASE_CLASS__

#include <list>
#include <vector>

#include "ParticleBase.hpp"

class EmitterBase {

public:

	EmitterBase(std::list<ParticleBase*> *particles, float posX, float posY, PixelBuffer *texture);
	~EmitterBase(void);

	 // to be called every frame
	void Update();

	// set position
	void SetPos(float _x, float _y);

protected:

	EmitterBase(void); //can't call this!

	// emitter position
	float x,y; 

	// pointer to particle list
	std::list<ParticleBase*> *particles; 
	
	ParticleBase* CreateParticle(); 

	int life; 

	// pointer to vector of textures
	PixelBuffer * texture;
};

#endif // __EMITTER_BASE_CLASS__